#include "console.h"
#include "frontend.h"
#include "syscall.h"
#include "mmap.h"
#include "file.h"
#include "elf.h"
#include "trap.h"
#include "proc.h"
#include "memory.h"
#include "fs.h"
#include "mtrap.h"
#include "riscv.h"
#include "sound.h"

void timer_print(){
   volatile uint64 * mtime=(uint64 *)0x200bff8;
    volatile uint64 * timecmp=(uint64 *)0x2004000;
    printk("mtime %p %p\n",mtime,*mtime);
    printk("timecmp %p %p\n",timecmp,*timecmp);
}

int main(){

      file_init();
      vm_init();
      trap_init();

      printk("thinos kernel is booting\n");
      procinit();
      sound_init();
      firstUserProcessInit();
      scheduler();
      shutdown(-1);
      return 0;
}